<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Call function</title>
    <script>
        alert("start!");
        function timeoutExecute(){
            console.log("enter timeoutExecute()...");
            setTimeout("alert('this is a interval alert!')", 3000)
        }
        timeoutExecute();   //加载时自动执行一次js函数
    </script>
</head>


<body>
<form>
    <!-- 手动点击按钮时调用一次js函数 -->
    <input onclick="timeoutExecute()" type="button" value="clickOn" name="t_input"/>

</form>
</body>
</html>